/*
 * UrlContract.java
 * business
 *
 * Created by SunDing on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.url;

import com.github.lzyzsd.jsbridge.BridgeWebView;
import com.yidiandao.business.base.BasePresenter;
import com.yidiandao.business.base.BaseView;
import com.yidiandao.business.data.bean.ShareEntity;
import com.yidiandao.business.data.recyclertype.Article;

import java.util.List;

/**
 * 项目中说明性文字展示界面
 */
public class UrlContract {

    /**
     * View 层接口.
     */
    interface View extends BaseView<Presenter> {

        BridgeWebView getWebView();

        void toPayResultActivity(String orderPayId, String orderId);

        List<String> getImagesUrlsFromHtml();

        void toEnrollActivity(Article article);

        void toArticleCommentActivity(Article article, boolean commentNow);

        void toEnrollPayFailedActivity(String recId);

        void setRequestedOrientation(boolean isDelivery);

        void toGoodsDetailActivity(String goodsId);

        void toShopDetailActivity(String supplierId);

        void toShoppingCartFragment();

        void toLoginActivity();

        void toBrandGoodsActivity(String brandName, String brandId, String supplierId);

        void doClientShare(ShareEntity shareEntity);

        void setShareIconVisible(boolean visibility);

        void toConfirmOrderActivity();

        void finishActivity();

        String getTitle();

        void setToolbarVisible(boolean visible);

        void setArticleOperatorLayoutVisible(boolean visible);

        void setBottomLayoutData(Article article);

        void notifyLikeCountChanged();

        void toRedPacketActivity();

        void toSignHistoryActivity();

        void loadUrl();

        void toUrlActivity(String url);

        void toCouponActivity();
    }

    /**
     * Presenter 层接口.
     */
    interface Presenter extends BasePresenter {

        void getArticleInfoFromServer();

        String getUrl();

        String getOrderPayId();

        boolean isOnlinePay();

        boolean isFreeScreenOrientation();

        boolean isFirstIn();

        String getRecId();

        void registerJavaInterfaceForJs();

        ShareEntity getShareData();

        void tellJsLoginStateChanged();

        void tellJsClientShareSuccess();

        ShareEntity createUrlShareData();

        boolean shareFeatureEnable();

        void likeArticle(Article article);

        void checkEnrollOnlinePayState();

        void postRefreshEnrollResultStateEvent(boolean paySuccess);

        boolean checkIsArticle();
    }
}
